package com.zheng.redpacket.server.serivce;

import com.zheng.redpacket.mdg.model.PraiseRankDto;
import com.zheng.redpacket.server.dto.PraiseDto;

import java.util.Collection;

public interface PraiseService {
    /**
     * 点赞
     * @param dto
     * @throws Exception
     */
    void addPraise(PraiseDto dto) throws Exception;

    /**
     * 取消点赞
     * @param dto
     * @throws Exception
     */
    void cancelPraise (PraiseDto dto) throws Exception;

    /**
     * 获取博客点赞总数
     * @param blogId
     * @return
     * @throws Exception
     */
    Long getBlogPraiseTotal(Integer blogId) throws Exception;

    /**
     * 获取点赞排行榜
     * @return
     * @throws Exception
     */
    Collection<PraiseRankDto> getRank() throws Exception;
}
